package com.example.widgetcase.slice;

import com.example.widget_lib.widget.HalfCircleProView;
import com.example.widgetcase.ResourceTable;
import ohos.aafwk.content.Intent;
import ohos.agp.utils.Color;

public class HalfCircleProViewAbility extends BaseSlice {

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        HalfCircleProView hcpv = (HalfCircleProView) findComponentById(ResourceTable.Id_half_circle_porview);
        Color[] colors = new Color[]{new Color(Color.rgb(255, 196, 0)), new Color(Color.rgb(255, 105, 83))};
        hcpv.setGradientColors(colors);
        getUITaskDispatcher().delayDispatch(() -> hcpv.setProgress(88f), 320);
    }

    @Override
    public int getChildUIContent() {
        return ResourceTable.Layout_half_circle_proview;
    }
}
